package com.xing.binbackend.pattern.responsibility.acore;

// 2. 具体处理者A
public class ConcreteHandlerB extends Handler {
    @Override
    public void handleRequest(Request request) {
        if (canHandle(request)) {  // 判断是否处理
            // 处理逻辑...
        } else {
            passToNext(request);  // 传递给下一个
        }
    }

    private boolean canHandle(Request request) {
        // 判断条件...
        return false;
    }
}
